<?php

namespace App\Models;

use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class DistributionStatistics
 * @package App\Models
 * @version November 27, 2017, 3:06 am CST
 *
 * @property date date
 * @property integer type
 * @property integer user_id
 * @property integer pairing_number
 * @property integer verify_number
 * @property integer shipping_number
 * @property string json
 */
class DistributionStatistics extends Model
{
    use SoftDeletes;

    public $table = 'distribution_statistics';
    

    protected $dates = ['deleted_at'];


    public $fillable = [
        'date',
        'type',
        'user_id',
        'pairing_number',
        'verify_number',
        'shipping_number',
        'shipping_overtime_number',
        'json'
    ];

    /**
     * The attributes that should be casted to native types.
     *
     * @var array
     */
    protected $casts = [
        'type' => 'integer',
        'user_id' => 'integer',
        'pairing_number' => 'integer',
        'verify_number' => 'integer',
        'shipping_number' => 'integer',
        'json' => 'string'
    ];

    /**
     * Validation rules
     *
     * @var array
     */
    public static $rules = [
        
    ];

    public function user()
    {
        return $this->belongsTo('App\User');
    }
}
